#{extends 'frame.html' /}

#{set title:'卖家微代任务详情' /}



#{set 'moreStyles'}

<link rel="stylesheet" media="screen" href="@{'/public/stylesheets/task-detail.css'}" />

<link rel="stylesheet" media="screen" href="@{'/public/stylesheets/jquery.pagination.css'}" />
<style type="text/css">
</style>
#{/set}



<div id="taskInfoCols" class="clearfix">

	<div class="contentCard leftPart floatLeft">

		<div class="contentTitle">

			<span class="iconfont">&#xf0142;</span>

			任务信息

		</div>

		<div class="contentBody">

			<div class="panelLine">

				<span class="lbl">分享任务总数</span>

				<span class="mr-4 orange">${task.totalShareCount}</span>

				<span>单</span>

			</div>
			
			<div style="padding-left:20px;">

				<div class="panelLine">

					<span class="mr-4">进行中</span>

					<span class="mr-4 orange">${task.takeCount}</span>

					<span class="mr-4">未接手</span>

					<span class="mr-4 red">${task.totalShareCount-task.takeCount}</span>

				</div>

			</div>
			
			<div class="panelLine">

				<span class="lbl">订单任务总数</span>

				<span class="mr-4 orange">${task.totalOrderCount}</span>

				<span>单</span>

			</div>
			
			<div style="padding-left:20px;">

				<div class="panelLine">

					<span class="mr-4">进行中</span>

					<span class="mr-4 orange">${task.sellOrderCount}</span>

					<span class="mr-4">未接手</span>

					<span class="mr-4 red">${task.totalOrderCount-task.sellOrderCount}</span>

				</div>

			</div>

			<hr/>

			<div class="panelLine">

				<span class="lbl">任务编号</span>

				<span id="taskId">${task.id}</span>

			</div>

			#{if task.publishTime}

			<div class="panelLine">

				<span class="lbl">发布时间</span>

				<span>${task?.publishTime?.format("yyyy-MM-dd HH:mm:ss")}</span>

			</div>

			#{/if}

			<hr/>


		</div>

	</div>

	<div class="contentCard">

		<div class="contentTitle">

			<span class="iconfont">&#xf0025;</span>

			任务状态明细

		</div>

		<div class="contentBody delt-info" style="height:395px;">

			<div class="state">

				<h4>任务状态：<span class="mr-20">${task.status.title}</span></h4>

				<hr/>

				<!-- 
				<p class="mb">

					<span class="mr-20">买手已付款，待发货</span>

					<span class="green">(0)</span>个

				</p>

				<p class="mb">

					<span class="mr-20">买手已收货好评，待返还本金</span>

					<span class="green">(0)</span>个

				</p>
				 -->

				<p class="mb">

					<span class="mr-20">任务发布时间：</span>

					<span class="green" id="publishTime">${task?.publishTime?.format("yyyy-MM-dd HH:mm:ss")}</span>

				</p>

			</div>

		</div>

	</div>

</div>



<div class="contentCard">

	<div class="contentTitle">

		<span class="iconfont">&#x3434;</span>

		子任务列表

		<a href="javascript:;" class="ml20 inputCheckBox inputCheckBox-checked" id="ckShowtCancledTask">&nbsp;</a>

		<span>显示已取消的任务</span>

		<span class="floatRight">

			<form id="exportForm" action="" method="post">

				#{authenticityToken /}

				<span class="mr-20" >
					<!-- 
					<input type="button" class="bold red" value=" 导出买手任务 " id="btnExportCsv"/>
 					-->
				</span>

			</form>

		</span>

	</div>

	<div class="contentBody" id="subOrderPanel">
		<table class="normTable">
			<thead>
				<tr>
					<td class="" width="13%">任务编号</td>
					<td class="" width="13%">接手时间</td>
					<td class="" width="13%">任务截图</td>
					<td class="" width="13%">状态</td>
					<td class="" width="12%">审核时间</td>
					<td class="" width="9%">待审核订单</td>
					<td class="" width="9%">已返款订单</td>
					<td class="" width="9%">已驳回订单</td>
					<td class="" width="9%">已完成订单</td>
				</tr>
			</thead>
			<tbody id="taskContainer"></tbody>
		</table>
		<div id="noMsg"><div class="warnBox"><span class="iconfont">&#xf00b6;</span>没有任务!</div></div>
		<!-- 分页区域-->
		<div class="pagin-btm clearFix">
			<div class="pagination"></div>
		</div>

	</div>

</div>


<div class="contentCard">

	<div class="contentTitle">

		分享图片

	</div>

	<div class="contentBody">

		<div id="itemInfo" class="clearfix">

		#{list items:task?.shareImageUrls?.split(','), as:'cw'}

				<img  class="floatLeft ml20" width="200" height="200"  src="${cw}">

		#{/list}

		</div>

	</div>

</div>

<div class="contentCard">

	<div class="contentTitle">

		商品信息

	</div>

	<div class="contentBody">

		<div id="itemInfo" class="clearfix">

			<div class="picBox floatLeft">

				<img src="${task.itemPic}" />

			</div>

			<div class="contInfo floatLeft">

				<p class="title">${task.itemTitle}</p>

				<div>

				<p id="urlMsg">${task.itemUrl}</p>

				<a class="grey" id="copyUrl" href="javascript:;" >[点击复制]</a>

				</div>
			</div>

		</div>

	</div>

</div>





<div class="contentCard">

	<div class="contentTitle">

		<span class="iconfont">&#xf0179;</span>

		费用明细

	</div>

	<div class="contentBody" id="feePanel">

		<table class="normTable">

			<thead>

				<tr>

					<td width="15%" class="item">分类</td>

					<td width="30%" class="item">费用明细</td>

					<td width="15%">小计</td>

					<td width="20%">合计</td>

					<td width="20%">备注</td>

				</tr>

			</thead>

			<tbody>

				<tr>

					<td class="green item">金币</td>

					<td class="item">

						分享任务佣金：

						<span class="red">${task.baseCommission/100}</span>元/单

					</td>

					<td>

						<span class="mr-4 red">${task.baseCommission/100}</span>元

					</td>

					<td>${task.baseCommission/100} X ${task.totalShareCount}=${task.totalShareCount*task.baseCommission/100}元</td>

					<td></td>

				</tr>
				<tr>

					<td class="green item">押金</td>

					<td class="item">

						订单任务佣金：

						<span class="red">${task.cashback/100}</span>元/单

					</td>

					<td>

						<span class="mr-4 red">${task.cashback/100}</span>元

					</td>

					<td>${task.cashback/100} X ${task.totalOrderCount}=${task.totalOrderCount*task.cashback/100}元</td>

					<td></td>

				</tr>

			</tbody>

		</table>



		<div class="secondTile">

			费用总计&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

			<span class="ls ">

				分享佣金金币：

				<span class="red bold spRow-total-1 mr4 ml4 ">${task.baseCommission*task.totalShareCount/100}</span>

				元，代销佣金押金：

				<span class="red bold spRow-total-4 mr4 ml4 ">${task.cashback*task.totalOrderCount/100}</span>

				个

			</span>

		</div>

	</div>

</div>



<!-- 子任务列表模板 -->

<textarea id="taskTemp" class="muban">

	{{#results}}

	<tr>

		<td>{{id}}</td>
		<td>{{takeTimeStr}}</td>
		<td>
			<a href="{{picUrl}}" target="_blank"><img src="{{picUrl}}" width="80" height="60"/></a>
		</td>
		<td>
			{{statusTxt}}
		</td>
		<td>
			{{modifyTimeStr}}
		</td>
		<td>
			<a href="/task/orderTask/wait_check?taskId={{taskIdStr}}&shareId={{id}}" target="_blank">{{waitCheckCount}}</a>
		</td>
		<td>
			{{refundedCount}}
		</td>
		<td>
			{{disallowedCount}}
		</td>
		<td>
			{{finishedCount}}
		</td>
	</tr>

	{{/results}}

</textarea>

#{set 'moreScripts'}

<script src="@{'/public/javascripts/jquery.pagination.js'}" type="text/javascript"></script>

<script src="@{'/public/javascripts/mustache.min.js'}" type="text/javascript"></script>

<script src="@{'/public/javascripts/jquery.number.min.js'}" type="text/javascript"></script>

<script src="@{'/public/javascripts/jquery.zclip.js'}" type="text/javascript"></script>

<script src="@{'/public/javascripts/task/wdTaskDetail.js'}" type="text/javascript"></script>

<script type="text/javascript">

    App.module = '${role=='admin'?'tasklist':''}';

	App.userRole = '${role}';

</script>

#{/set}